import 'package:flutter/material.dart';

// 通用顶部标签组合
class AppBarTab extends StatelessWidget {
  AppBarTab(
      {this.margin,
      this.padding,
      this.text});

  final EdgeInsets margin; // 外边距
  final EdgeInsets padding; // 内边距
  final String text; // 显示内容

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.topCenter,
      margin: margin ?? const EdgeInsets.symmetric(horizontal: 10),
      padding: padding ?? const EdgeInsets.all(8),
      child: Text(text, softWrap: false, overflow: TextOverflow.fade),
    );
  }
}
